<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>$compile_dir</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Smarty 3 Manual">
<link rel="up" href="api.variables.html" title="Chapter 13. Smarty Class Variables">
<link rel="prev" href="variable.compile.check.html" title="$compile_check">
<link rel="next" href="variable.compile.id.html" title="$compile_id">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">$compile_dir</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="variable.compile.check.html">Prev</a> </td>
<th width="60%" align="center">Chapter 13. Smarty Class Variables</th>
<td width="20%" align="right"> <a accesskey="n" href="variable.compile.id.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="sect1" title="$compile_dir">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="variable.compile.dir"></a>$compile_dir</h2></div></div></div>
<p>
     This is the name of the directory where compiled templates are
     located. By default this is
     <code class="filename">./templates_c</code>, meaning that Smarty
     will look for the <code class="filename">templates_c/</code>
      directory in the same directory as
     the executing php script. <span class="bold"><strong>This directory must
     be writeable by the web server</strong></span>,
     <a class="link" href="installing.smarty.basic.html" title="Basic Installation">see install</a> for more info.
    </p>
<div class="note" title="Technical Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Technical Note</h3>
<p>
      This setting must be either a relative or
      absolute path. include_path is not used for writing files.
     </p>
</div>
<div class="note" title="Technical Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Technical Note</h3>
<p>
      It is not recommended to put this directory under
      the web server document root.
     </p>
</div>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
      As of Smarty 3.1 the attribute $compile_dir is no longer accessible directly. Use 
      <a class="link" href="api.get.compile.dir.html" title="getCompileDir()"><code class="varname">getCompileDir()</code></a> and 
      <a class="link" href="api.set.compile.dir.html" title="setCompileDir()"><code class="varname">setCompileDir()</code></a> instead.
     </p>
</div>
<p>
     See also 
     <a class="link" href="api.get.compile.dir.html" title="getCompileDir()"><code class="varname">getCompileDir()</code></a>, 
     <a class="link" href="api.set.compile.dir.html" title="setCompileDir()"><code class="varname">setCompileDir()</code></a>,
     <a class="link" href="variable.compile.id.html" title="$compile_id"><em class="parameter"><code>$compile_id</code></em></a>
     and
     <a class="link" href="variable.use.sub.dirs.html" title="$use_sub_dirs"><em class="parameter"><code>$use_sub_dirs</code></em></a>.
    </p>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="variable.compile.check.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="api.variables.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="variable.compile.id.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">$compile_check </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> $compile_id</td>
</tr>
</table>
</div>
</body>
</html>
